package cn.tq365.service.sys;

import javax.annotation.Resource;

import org.springframework.context.annotation.Scope;
import org.springframework.stereotype.Service;

import cn.tq365.mapper.AsCustomerMapper;
import cn.tq365.model.sys.AsCustomer;
import cn.tq365.model.sys.CustomerLinkAccount;

/**
 * 客户服务类
 * 
 * @author lili
 * 
 */
@Service
@Scope("prototype")
public class AsCustomerService {
	@Resource
	AsCustomerMapper asCustomerMapper;

	/**
	 * 添加
	 * 
	 * @param customer
	 * @throws Exception
	 */
	public void add(AsCustomer customer) throws Exception {
		try {
			asCustomerMapper.add(customer);
		} catch (Exception e) {
			e.printStackTrace();
			throw e;
		}

	}

	/**
	 * 添加渠道账户
	 * 
	 * @param link
	 * @throws Exception
	 */
	public void addAccount(CustomerLinkAccount link) throws Exception {
		try {
			asCustomerMapper.addAccount(link);
		} catch (Exception e) {
			e.printStackTrace();
			throw e;
		}

	}

	/**
	 * 查询
	 * 
	 * @return
	 * @throws Exception
	 */
	// public List<BaiduAccount> query() throws Exception {
	// try {
	// return mapper.query();
	// } catch (Exception e) {
	// e.printStackTrace();
	// throw e;
	// }
	// }
}
